﻿using Nest;

namespace WinFormElasticSearch.EsHelper
{
    public class NullElasticClient
    {
        private static ElasticClient _instance;

        /// <summary>
        /// Singleton instance.
        /// </summary>
        public static ElasticClient Instance
        {
            get
            {
                if (_instance == null)
                {
                    _instance = new ElasticClient(ElasticSearchSource.CreateInstance());
                }

                return _instance;
            }
        }
    }
}